Example Program
Rooted Iterators
Example for some functions for handling (rooted) iterators.
File "rooted_iterator.cpp"
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 |
The Iterator metafunction returns a rooted iterator by default.
We can also specify the iterator kind explicitly by passing the iterator spec Rooted as second argument.
| 8 |
The same iterator spec can be used as a tag for functions that return an iterator, e.g. begin or end
| 9 |
A rooted iterator "knows" its container, so it supports the function container:
| 10 |
Moreover, it is possible to apply functions like goBegin or position to rooted iterators without specify the container.
| 11 | |
| 12 | |
| 13 | |
| 14 |
See
See Also
SeqAn - Sequence Analysis Library - www.seqan.de